package com.jr.controller;

import com.jr.pojo.FlightGet;
import com.jr.pojo.FlightPojo;
import com.jr.pojo.SellcompanyPojo;
import com.jr.service.FlightsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/po/")
public class Controller {

    @Autowired
    private FlightsService flightsService;

    @RequestMapping("show")
    public ArrayList<FlightPojo> select(FlightGet flightGet) {

        return flightsService.select(flightGet);
    }


    @RequestMapping("selectById")
    public ArrayList<SellcompanyPojo> selectById(int id) {
        return flightsService.selectById(id);
    }


}
